home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / demo / client / scripts / racingGui.cs < prev    next >
Encoding:
Text File  |  2005-11-23  |  1.0 KB  |  39 lines

  1. //-----------------------------------------------------------------------------
  2. // Torque Game Engine 
  3. // Copyright (C) GarageGames.com, Inc.
  4. //-----------------------------------------------------------------------------
  5.  
  6. //-----------------------------------------------------------------------------
  7. // RacingGui is the main TSControl through which the racing game is viewed.
  8. // The RacingGui also contains the hud controls.
  9. //-----------------------------------------------------------------------------
  10.  
  11. function RacingGui::onWake(%this)
  12. {
  13.    // Turn off any shell sounds...
  14.    // alxStop( ... );
  15.  
  16.    $enableDirectInput = "1";
  17.    activateDirectInput();
  18.  
  19.    // Message hud dialog
  20.    Canvas.pushDialog(MainChatHud);
  21.    chatHud.attach(HudMessageVector);
  22.  
  23.    // Push the game's action key mapings
  24.    moveMap.push();
  25.    
  26.    // Force third person view as the default.
  27.    $firstPerson = false;
  28. }
  29.  
  30. function RacingGui::onSleep(%this)
  31. {
  32.    Canvas.popDialog(MainChatHud);
  33.    
  34.    // Pop the keymaps
  35.    moveMap.pop();
  36. }
  37.  
  38.  
  39.